import { computed } from 'vue';

export const useComputed = () => {
  /**
   * @desciption 计算合并bind对象
   * @param {Object} attrs
   * @returns {Object} bindAttrs
   */
  const getBindValues = computed(() => {
    return (attrs, item) => {
      let propsData = {
        ...attrs,
        ...item,
      };
      delete propsData['onClick'];
      return propsData;
    };
  });

  return {
    getBindValues,
  };
};
